<template>
	<view>
		<div class="goods-type">
			<view class="name" :style="{'border-bottom':goods_type == 1?'1px solid #FF7104':'','color':goods_type == 1?'#FF7104':''}" @click="switchTab(1)">兰亭商品</view>
			<view class="name" :style="{'border-bottom':goods_type == 2?'1px solid #FF7104':'','color':goods_type == 2?'#FF7104':''}" @click="switchTab(2)">再团商品</view>
		</div>
		
		<view class="body" v-if="goodsList.length > 0">
		
			
			<view v-if="goods_type == 1" class="list-item" v-for="item in goodsList" @click="openUrl('/pages/goods/detail?proId='+item.goods_id)">
				<view class="left">
					<image :src="item.cover_pic" lazy-load="true" class="tui-goods-img"></image>
				</view>
				<view class="right">
					<view class="name">{{item.goods_name}}</view>
					<view style="display: flex;align-items: center;justify-content:space-between;">
						<view style="margin-right: 20rpx;"><text style="font-size: 10pt;">￥</text>{{(item.price)}}</view>
						<view style="font-size: 10pt;color:#a3a3a3;">库存数量：x{{item.stock_num}}</view>
					</view>
				</view>
			</view>
			
			<view v-if="goods_type == 2" class="list-item" v-for="item in goodsList" @click="openUrl('/plugins/local_life/flowGoodsDetail?goods_id='+item.goods_id)">
				<view class="left">
					<image :src="item.cover_pic" lazy-load="true" class="tui-goods-img"></image>
				</view>
				<view class="right" style="display: flex;flex-direction: column;justify-content: space-around;height: 35vw;">
					<view>
						<view class="name">{{item.name}}</view>
						<view style="display: flex;align-items: center;justify-content: flex-end;">
							<view style="margin-right: 20rpx;"><text style="font-size: 10pt;">￥</text>{{(item.price)}}</view>
						</view>
					</view>
					<view>
						<view style="display: flex;justify-content: space-between;margin-top: 10rpx;">
							<view style="font-size: 10pt;">{{item.store_name}}</view>
							<view style="font-size: 9pt;">{{convertDistance(item.distance)}}</view>
						</view>
						<view style="width:100%;font-size:9pt;overflow: hidden;display:-webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;text-align: right;">{{item.address}}</view>
					</view>

					<view style="font-size: 10pt;text-align: right;margin-top: 30rpx;">截止到：{{formatTimeToStr(item.expired_at * 1000)}}</view>
				</view>
			</view>
		</view>

		<view class="body order-nothing" v-if="!goodsList.length">
			<svg t="1724644309888" class="icon" viewBox="0 0 1188 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5635" width="128" height="128">
				<path d="M0 773.7c0 48.3 108 92.9 283.4 117.1 175.4 24.1 391.5 24.1 566.9 0 175.4-24.2 283.4-68.8 283.4-117.1s-108-92.9-283.4-117.1c-175.4-24.1-391.5-24.1-566.9 0C108 680.8 0 725.4 0 773.7z m0 0" fill="#F5F5F5" p-id="5636"></path>
				<path d="M494.8 136c26.3-15.3 41.5-13 50.2-3 21.8 25.2-26.5 62.6-32 69.4-5.5 6.8 6.6 11.2 6.6 11.2 157.8 80.1 217.7 222 217.7 341.2 0 92.6-34.6 168.3-97.8 210.5-39.1 26.1-156.1 60.2-277.5 57.7-152.4-3.1-311.9-59.2-334-209-42-286 186.4-387.8 200.9-393.1 14.5-5.3 3.7-15.7 0-18.5-46.7-34.8-29.1-53.4-22-60.5 8.2-8.2 27.2-12.3 51.3 7.3 26.6 21.6 30.1 43.3 42 44.6 11.9 1.3 85.8-16 149.5 0 0.1 0 20.7-43.6 45.1-57.8z m0 0" fill="#FCFCFC" p-id="5637"></path>
				<path d="M526.9 125c8 0 13.9 3.1 18.2 8 21.8 25.2-26.5 62.6-32 69.4-5.5 6.8 6.6 11.2 6.6 11.2 157.8 80.1 217.7 222 217.7 341.2 0 92.6-34.6 168.3-97.8 210.5-37.8 25.2-148 57.9-264.9 57.9-4.2 0-8.4 0-12.6-0.1-152.4-3.1-311.9-59.2-334-209C-14 328 214.4 226.2 228.9 220.9c14.5-5.3 3.7-15.7 0-18.5-46.7-34.8-29.1-53.4-22-60.5 3.8-3.9 10.1-6.8 18.2-6.8 9.1 0 20.4 3.7 33.2 14.1 26.6 21.6 30.1 43.3 42 44.6 0.4 0 0.9 0.1 1.5 0.1 10.5 0 45.6-6.9 86-6.9 20.1 0 41.6 1.7 62 6.8 0 0 20.6-43.6 45-57.8 13.3-7.8 23.8-11 32.1-11m0-9.1c-10.5 0-22.5 4-36.6 12.2-20.8 12.1-38.3 41.9-45.4 55.2-17.1-3.6-36.2-5.5-57.1-5.5-27.3 0-52.3 3.1-68.8 5.1-7.6 0.9-14.2 1.8-17.2 1.8h-0.6c-1.7-0.2-5.7-6.1-8.7-10.4-5.9-8.6-14-20.4-28.5-32.2-16.4-13.4-30.2-16.2-38.9-16.2-9.8 0-18.5 3.4-24.6 9.5-3.5 3.5-12.8 12.8-11.8 27.3 1.1 14.9 12.5 30.3 34.8 46.9 1 0.7 1.9 1.7 2.6 2.5-0.1 0-0.2 0.1-0.3 0.1-0.6 0.2-66.9 26.4-125.4 93.9-31.7 36.5-55.1 78.2-69.4 123.7-17.7 56.2-21.7 118.6-11.9 185.4C29.7 687.6 71 743.5 141.9 781.6c73.7 39.6 160.3 49.4 220 50.6 4.3 0.1 8.5 0.1 12.8 0.1 111.8 0 227.2-30.8 270-59.4 65.7-43.9 101.9-121.4 101.8-218.1 0-66.2-17.6-131.8-50.9-189.8-38.9-67.8-96.7-121.4-171.8-159.5-0.2-0.1-0.5-0.2-0.7-0.3l1.5-1.5c14-13.4 51.4-48.9 27.3-76.7-6.3-7.3-15-11.1-25-11.1z m0 0" fill="#BEBEBE" p-id="5638"></path>
				<path d="M564.3 239.6c37.1 48.5 120.2 167.3 122.1 260.4 3.8 182.1-61.6 283.8-279.7 322.5 104.6-5.1 198.8-34.1 233.1-57.1 63.2-42.2 97.8-117.9 97.8-210.5 0.1-107.2-48.5-232.9-173.3-315.3z m0 0" fill="#F5F5F5" p-id="5639"></path>
				<path d="M667.2 490.3s10 14.2 18.5 6.2c8.5-8 5.8-6.5 11.5-11.2 5.7-4.7 18.3-10.4 22.8 4.5s-3.2 27.5-14.6 37.9c-11.4 10.4-24.3 21.8-44.8 22.8" fill="#F6F6F6" p-id="5640"></path>
				<path d="M660.5 555.1c-2.5 0-4.5-2-4.6-4.4-0.1-2.5 1.9-4.5 4.3-4.7 19.4-0.9 31.4-11.9 42-21.6 12.3-11.2 16.7-22.1 13.3-33.2-1-3.5-2.6-5.5-4.5-6.1-3.2-1-7.9 1.3-11 3.8-2.7 2.2-3.2 2.8-4.3 4-1.1 1.3-2.7 3-7 7-2.9 2.7-6.4 3.9-10.1 3.6-8.2-0.8-14.5-9.5-15.2-10.5-1.4-2.1-1-4.9 1.1-6.3 2.1-1.4 4.9-1 6.3 1.1 1.5 2 5.5 6.4 8.7 6.7 0.7 0.1 1.7 0 2.9-1.2 4-3.8 5.4-5.3 6.5-6.5 1.3-1.5 2.2-2.4 5.2-4.9 4.9-4 12.6-7.6 19.4-5.5 3.5 1.1 8.2 4 10.6 12.2 4.4 14.6-1 28.9-15.9 42.6-11.2 10.2-25.1 22.9-47.7 24v-0.1z m0 0" fill="#BEBEBE" p-id="5641"></path>
				<path d="M269.7 361.3s-5.9 22.8-29.6 15.2" fill="#F6F6F6" p-id="5642"></path>
				<path d="M249.3 382.6c-3.3 0-6.8-0.6-10.5-1.8-2.4-0.8-3.7-3.3-2.9-5.7 0.8-2.4 3.3-3.7 5.7-2.9 5.9 1.9 10.9 1.8 15-0.4 6.6-3.6 8.8-11.5 8.8-11.6 0.3-1.2 1.1-2.2 2.1-2.8 1-0.6 2.3-0.8 3.4-0.5 2.4 0.6 3.9 3.1 3.2 5.5-0.1 0.5-3.2 11.7-13.2 17.2-3.5 2-7.5 3-11.6 3z m0 0" fill="#BEBEBE" p-id="5643"></path>
				<path d="M433.4 358.5s2.2 23.5 32 21.5" fill="#F6F6F6" p-id="5644"></path>
				<path d="M461.9 384.6c-30.2 0-33-25.4-33-25.7-0.2-2.5 1.6-4.6 4.1-4.9 2.5-0.2 4.7 1.5 5 4 0.2 2 2.8 19 27.2 17.4 1.6-0.1 3.2 0.6 4.2 2 0.9 1.4 1 3.1 0.3 4.6-0.7 1.5-2.2 2.4-3.9 2.5-1.4 0.1-2.7 0.1-3.9 0.1z m-7.9 85.5c-15.6 0-20.9-6.5-22.6-11.9-4.4-13.9 11.2-33.8 18.9-39.2 13.1-9.2 43.2-15.6 73.3-15.6 18.9 0 53.6 2.8 73 21.2 13.8 13.1 18.9 24.5 15.2 34-3 7.6-11.5 11.6-18.3 11.6h-30.3c-34.1 0-82.5-0.1-108.9 0h-0.3z m69.6-57.6c-31.3 0-58.4 7.2-68 14-6.8 4.8-18 20.9-15.5 29 1.5 4.6 8.4 5.6 13.9 5.6v4.6l0.2-4.6c26.4-0.1 74.8-0.1 108.9 0h30.3c3 0 8.3-1.9 9.9-5.8 2.1-5.4-2.6-14.1-13-24-12.7-12.2-36.4-18.8-66.7-18.8z m0 0" fill="#BEBEBE" p-id="5645"></path>
				<path d="M593.5 427.9c-9-8.6-22.3-14-37.3-16.9-9.9 9-27.1 29.5-11.8 54.6h49.1c9.4-0.1 28.2-11 0-37.7z m-291.7 0c-9-8.6-22.3-14-37.3-16.9-9.9 9-27.1 29.5-11.8 54.6h49.1c9.4-0.1 28.2-11 0-37.7z m0 0" fill="#BEBEBE" p-id="5646"></path>
				<path d="M162.3 470.1c-15.6 0-20.9-6.5-22.6-11.9-4.4-14 11.3-33.8 18.9-39.2 13.1-9.2 43.2-15.6 73.3-15.6 18.9 0 53.6 2.8 73 21.2 13.8 13.1 18.9 24.5 15.2 34-3 7.6-11.5 11.6-18.3 11.6h-30.3c-34.1 0-82.5-0.1-108.9 0h-0.3z m69.6-57.6c-31.3 0-58.4 7.2-68 14-6.8 4.8-18 20.9-15.5 29 1.5 4.6 8.4 5.6 13.9 5.6v4.6l0.2-4.6c26.4-0.1 74.8-0.1 108.9 0h30.3c3 0 8.3-1.9 9.9-5.8 2.1-5.4-2.6-14.1-13-24-12.7-12.2-36.4-18.8-66.7-18.8z m0 0" fill="#BEBEBE" p-id="5647"></path>
				<path d="M355.3 503.7s9.9-12.4 16.4-13.5c6.4-1.1 18 2.6 13.9 13.5s-20.3 13.9-20.3 13.9 12.7-1.3 14.6 8.9c1.2 6.4-10.4 14.9-24.5-1.7" fill="#F6F6F6" p-id="5648"></path>
				<path d="M371.3 538.9c-4.8 0-11.8-2.2-19.5-11.3-1.6-1.9-1.4-4.8 0.5-6.4 1.9-1.6 4.8-1.4 6.4 0.5 6.6 7.7 12.1 8.9 14.9 7.6 1.3-0.6 1.8-1.7 1.7-2.1-1.1-5.8-8.8-5.3-9.7-5.2-2.4 0.2-4.6-1.5-4.9-3.9-0.3-2.4 1.3-4.7 3.7-5.1 3.8-0.7 14.3-4.1 16.9-11 1.2-3.2 0.2-4.5-0.2-4.9-1.7-2-5.9-2.9-8.6-2.5-2.8 0.5-9.3 6.5-13.6 11.9-1.6 2-4.4 2.3-6.4 0.7-2-1.6-2.3-4.4-0.7-6.4 1.8-2.3 11.4-13.8 19.1-15.1 5.4-0.9 13.1 0.7 17.2 5.6 3.1 3.7 3.7 8.7 1.7 13.9-2 5.4-6.2 9.1-10.5 11.7 2.4 1.9 4.3 4.7 5 8.7 0.9 4.7-1.9 9.7-6.7 12-1.1 0.5-3.3 1.3-6.3 1.3z m0 0" fill="#BEBEBE" p-id="5649"></path>
				<path d="M131.3 519.3c0 12 8.1 23 21.3 29 13.2 6 29.4 6 42.6 0 13.2-6 21.3-17 21.3-29s-8.1-23-21.3-29c-13.2-6-29.4-6-42.6 0-13.2 6-21.3 17-21.3 29z m0 0M510.9 519.3c0 18.5 19 33.4 42.4 33.4s42.4-15 42.4-33.4c0-18.5-19-33.4-42.4-33.4-23.4-0.1-42.4 14.9-42.4 33.4z m0 0" fill="#E8E8E8" p-id="5650"></path>
				<path d="M677.9 213.6c0 7.3 3.9 14 10.2 17.6 6.3 3.6 14 3.6 20.3 0 6.3-3.6 10.2-10.3 10.2-17.6 0-7.3-3.9-14-10.2-17.6-6.3-3.6-14-3.6-20.3 0-6.3 3.7-10.2 10.4-10.2 17.6z m0 0" fill="#E7E7E7" p-id="5651"></path>
				<path d="M698.2 238.5c-13.7 0-24.9-11.2-24.9-24.9s11.2-24.9 24.9-24.9 24.9 11.2 24.9 24.9-11.2 24.9-24.9 24.9z m0-40.6c-8.7 0-15.8 7.1-15.8 15.8 0 8.7 7.1 15.8 15.8 15.8 8.7 0 15.8-7.1 15.8-15.8 0-8.8-7.1-15.8-15.8-15.8z m0 0" fill="#BEBEBE" p-id="5652"></path>
				<path d="M766.6 213.6c0 7.3 3.9 14 10.2 17.6 6.3 3.6 14 3.6 20.3 0 6.3-3.6 10.2-10.3 10.2-17.6 0-7.3-3.9-14-10.2-17.6-6.3-3.6-14-3.6-20.3 0-6.4 3.7-10.2 10.4-10.2 17.6z m0 0" fill="#E7E7E7" p-id="5653"></path>
				<path d="M786.9 238.5c-13.7 0-24.9-11.2-24.9-24.9s11.2-24.9 24.9-24.9 24.9 11.2 24.9 24.9-11.2 24.9-24.9 24.9z m0-40.6c-8.7 0-15.8 7.1-15.8 15.8 0 8.7 7.1 15.8 15.8 15.8 8.7 0 15.8-7.1 15.8-15.8-0.1-8.8-7.1-15.8-15.8-15.8z m0 0" fill="#BEBEBE" p-id="5654"></path>
				<path d="M850.6 213.6c0 11.2 9.1 20.3 20.3 20.3 11.2 0 20.3-9.1 20.3-20.3 0-11.2-9.1-20.3-20.3-20.3-11.2 0-20.3 9.1-20.3 20.3z m0 0" fill="#E7E7E7" p-id="5655"></path>
				<path d="M870.9 238.5c-13.7 0-24.9-11.2-24.9-24.9s11.2-24.9 24.9-24.9 24.9 11.2 24.9 24.9-11.2 24.9-24.9 24.9z m0-40.6c-8.7 0-15.8 7.1-15.8 15.8 0 8.7 7.1 15.8 15.8 15.8 8.7 0 15.8-7.1 15.8-15.8 0-8.8-7.1-15.8-15.8-15.8z m30 161.7h-0.2c-1.5-0.1-2.6-1.4-2.6-2.9 0.1-1.3 2.2-32.6 19.6-44.9 2.9-2.1 6.3-3.6 9.8-4.3 2.1-4.3 5.8-9.1 11.8-14.4 17.6-15.5 30.4-19.6 71.2-13.5 1 0.1 1.8 0.8 2.2 1.7 0.4 0.9 0.2 1.9-0.4 2.7-0.6 0.8-1.6 1.1-2.6 1-39-5.8-50.4-2.2-66.8 12.2-3.8 3.3-6.7 6.6-8.8 9.7 3 0.1 5.9 0.6 8.8 1.4 13.5 3.8 13.8 11.1 13.3 14.1-1.1 6.4-8.7 12.3-15.5 11.8-5.4-0.3-12.4-4.1-14.9-11.4-0.7-2.1-1.2-5.2-0.5-9-1.6 0.6-3.1 1.4-4.4 2.4-15.2 10.8-17.3 40.5-17.3 40.8-0.1 1.4-1.3 2.6-2.7 2.6z m30.4-47.2c-1.1 3.1-1.2 6-0.3 8.6 1.6 4.8 6.3 7.5 10 7.8 4 0.3 9.1-3.6 9.8-7.3 0.8-4.4-5.5-6.9-9.4-7.9-3.6-1.1-6.9-1.4-10.1-1.2z m0 0" fill="#BEBEBE" p-id="5656"></path>
				<path d="M1025.8 259.9s14.1 5.5 27.5-16.8 34.4-26 69.1-20.8c0 0-27.5 35.9-53.5 46.1-26 10.1-43.1-8.5-43.1-8.5z m0 0" fill="#EBEBEB" p-id="5657"></path>
				<path d="M1053.4 274.1c-18.1 0-29.2-11.8-29.7-12.3-0.9-0.9-1-2.3-0.2-3.4 0.7-1 2.1-1.5 3.2-1 0 0 12 4.5 24.1-15.7 10.1-16.8 24.7-24.2 47.4-24.2 7 0 15 0.7 24.5 2.1 1 0.1 1.8 0.8 2.1 1.7 0.4 0.9 0.2 1.9-0.4 2.7-1.1 1.5-28.3 36.7-54.7 47-5.3 2-10.8 3.1-16.3 3.1z m-19.6-11.3c4.5 2.8 11.2 5.8 19.6 5.8 4.7 0 9.6-1 14.4-2.8 20.1-7.9 41.6-32.2 49.4-41.5-7.2-0.9-13.4-1.4-18.9-1.4-20.9 0-33.6 6.4-42.7 21.6-7.7 12.8-16 17.1-21.8 18.3z m0 0" fill="#BEBEBE" p-id="5658"></path>
				<path d="M1027.3 261.3s25.2 6.2 49.2-18.3c24-24.5 45.8-20.8 45.8-20.8" fill="#EBEBEB" p-id="5659"></path>
				<path d="M1035 264.8c-4.9 0-8-0.7-8.4-0.8-1.5-0.4-2.4-1.8-2-3.3 0.4-1.5 1.8-2.4 3.3-2 1 0.2 24.1 5.5 46.6-17.5 24.8-25.3 47.3-21.8 48.2-21.6 1 0.2 1.8 0.8 2.1 1.7 0.3 0.9 0.2 1.9-0.5 2.7-0.6 0.8-1.6 1.1-2.6 0.9-0.2 0-20.8-3.1-43.4 20-16.4 17-33.4 19.9-43.3 19.9z m0 0" fill="#BEBEBE" p-id="5660"></path>
				<path d="M1068.3 253c-1.5 0-2.7-1.2-2.7-2.7v-23.1c0-1 0.5-1.9 1.4-2.4 0.8-0.5 1.9-0.5 2.7 0 0.8 0.5 1.4 1.4 1.4 2.4v23.1c-0.1 1.5-1.3 2.7-2.8 2.7z m0 0M1089.5 233c-1.5 0-2.7-1.2-2.7-2.7v-9.7c0-1.5 1.2-2.7 2.7-2.7s2.7 1.2 2.7 2.7v9.7c0 0.7-0.3 1.4-0.8 1.9-0.5 0.6-1.2 0.8-1.9 0.8z m0 0" fill="#BEBEBE" p-id="5661"></path>
				<path d="M1061.9 254.5l12.9 11" fill="#EBEBEB" p-id="5662"></path>
				<path d="M1074.8 268.3c-0.6 0-1.3-0.2-1.8-0.7l-12.9-11c-0.8-0.6-1.1-1.6-1-2.6 0.2-1 0.9-1.8 1.8-2.1 0.9-0.3 2-0.1 2.7 0.6l12.9 11c0.9 0.7 1.2 1.9 0.8 3-0.3 1-1.3 1.8-2.5 1.8z m0 0" fill="#BEBEBE" p-id="5663"></path>
				<path d="M1079 240.6l14.8 9.7" fill="#EBEBEB" p-id="5664"></path>
				<path d="M1093.8 253c-0.5 0-1-0.2-1.5-0.4l-14.8-9.7c-1.3-0.8-1.6-2.5-0.8-3.8 0.4-0.6 1-1 1.7-1.2 0.7-0.1 1.5 0 2.1 0.4l14.8 9.7c1 0.7 1.4 1.9 1.1 3.1-0.3 1.1-1.4 1.9-2.6 1.9z m0 0" fill="#BEBEBE" p-id="5665"></path>
				<path d="M433.4 218.7c-0.3 0-0.6 0-0.9-0.1-3.6-0.7-6.4-1.3-9.4-1.3-4.1-0.1-8.3-0.3-12.4-0.5-1.6-0.1-3.1-1.1-3.8-2.5-0.7-1.5-0.6-3.2 0.3-4.5 0.9-1.4 2.5-2.1 4.1-2 4 0.2 8.1 0.4 12.1 0.5 3.8 0.1 7.1 0.7 11 1.5 2.3 0.4 3.9 2.6 3.7 4.9-0.4 2.3-2.4 4-4.7 4zM316.7 221c-2.2 0-4.1-1.5-4.5-3.7-0.4-2.1 0.7-4.3 2.7-5.1 9.2-3.8 17.6-4.9 27.2-5.4 6.6-0.3 15.6-0.3 26.2 2.7 1.6 0.4 2.8 1.7 3.2 3.3 0.4 1.6-0.1 3.3-1.2 4.4-1.2 1.1-2.9 1.6-4.4 1.1-7.4-2.1-14.3-2.8-23.3-2.3-8.7 0.4-16.2 1.4-24.2 4.7-0.5 0.2-1.1 0.3-1.7 0.3z m0 0" fill="#E7E7E7" p-id="5666"></path>
				<path d="M841 375l267.6 25.1L880 456.3l-155.6-19.5-12.6-30.7L841 375z m0 0" fill="#E6E6E6" p-id="5667"></path>
				<path d="M879.9 460.8h-0.6l-155.6-19.5c-1.6-0.2-3-1.3-3.6-2.8l-12.6-30.7c-0.5-1.2-0.4-2.6 0.2-3.8 0.6-1.2 1.7-2 3-2.4l129.2-31.1c0.5-0.1 1-0.2 1.5-0.1l267.6 25.1c2.2 0.2 4 2 4.1 4.2 0.2 2.2-1.3 4.2-3.5 4.8L881 460.7c-0.3 0.1-0.7 0.1-1.1 0.1z m-152.3-28.3l152.1 19.1 201.6-49.5-240-22.5L718 409.2l9.6 23.3z m0 0" fill="#BEBEBE" p-id="5668"></path>
				<path d="M841 455.9c-1.2 0-2.4-0.5-3.2-1.3-0.9-0.9-1.3-2-1.3-3.2V375c0-2.5 2-4.6 4.6-4.6 2.5 0 4.6 2 4.6 4.6v76.4c-0.2 2.5-2.2 4.5-4.7 4.5z m0 0" fill="#BEBEBE" p-id="5669"></path>
				<path d="M879.9 456.3s64.1 58.9 62.8 126.6c0 0 5.1 2.6 17.5-1.4s203.7-51.5 223-72.8c0 0 1.3-7.1-7.3-21.6-8.6-14.5-49.9-75-67.4-86.9l-228.6 56.1z m0 0" fill="#F0F0F0" p-id="5670"></path>
				<path d="M948 588.2c-4.4 0-6.8-1-7.4-1.3-1.6-0.8-2.5-2.4-2.5-4.1 1.3-64.8-60.7-122.6-61.3-123.1-1.2-1.1-1.7-2.9-1.3-4.5 0.4-1.6 1.7-2.9 3.3-3.3l228.6-56.2c1.3-0.3 2.6-0.1 3.6 0.7 18.8 12.7 60.6 74.6 68.8 88.3 9 15.2 8.1 23.3 7.8 24.8-0.2 0.8-0.5 1.6-1.1 2.2-15 16.6-117.5 45.4-205.2 68.7-10.3 2.7-17.8 4.7-19.8 5.4-4.9 1.6-9.5 2.4-13.5 2.4z m-0.7-9.1h0.8c2.1 0 5.7-0.3 10.8-2 2.2-0.7 9.4-2.6 20.3-5.5 44.9-11.9 179.7-47.8 199.6-65-0.2-2.3-1.2-8.1-6.7-17.4-8.3-14.1-47-70.6-64.5-84.3L889 458.6c15.8 16.5 57.5 64.8 58.3 120.5z m0 0" fill="#BEBEBE" p-id="5671"></path>
				<path d="M878 456s-48.9 53.2-56.1 127.7L743 569.3s3.9-57.3-18.5-132.5L878 456z m0 0" fill="#F0F0F0" p-id="5672"></path>
				<path d="M821.8 588.2c-0.3 0-0.6 0-0.8-0.1l-78.9-14.4c-2.3-0.4-3.9-2.5-3.7-4.8 0-0.6 3.6-57.4-18.3-130.9-0.4-1.5-0.1-3.1 0.9-4.2 1-1.2 2.5-1.8 4-1.6l153.6 19.3c1.7 0.2 3.1 1.3 3.7 2.9 0.6 1.6 0.2 3.4-0.9 4.6-0.5 0.5-47.9 53-55 125-0.1 1.3-0.8 2.4-1.8 3.2-0.8 0.7-1.8 1-2.8 1z m-74.2-22.7l70.2 12.8c7.2-58.4 38.4-102.7 51.3-118.8l-138.4-17.4c17.3 61.5 17.3 109.4 16.9 123.4z m0 0" fill="#BEBEBE" p-id="5673"></path>
				<path d="M879 456.3v317s122.7-41.1 229.6-66.9V539.6l-101.3 29.2-52.7 14.2s-9.3 2-11.9-0.1c-2.5-2.2 9.1-53.7-63.7-126.6z m0 0" fill="#FAFAFA" p-id="5674"></path>
				<path d="M879 777.8c-1.2 0-2.4-0.5-3.2-1.3-0.9-0.9-1.3-2-1.3-3.2v-317c0-1.8 1.1-3.5 2.8-4.2 1.7-0.7 3.7-0.3 5 1 62.6 62.6 64.1 109.6 64.5 125v1.2h0.4c2.9 0 6.5-0.8 6.5-0.8l52.4-14.1 101.2-29.2c1.4-0.4 2.9-0.1 4 0.7 1.1 0.9 1.8 2.2 1.8 3.6v166.7c0 2.1-1.4 3.9-3.5 4.4-105.4 25.4-228 66.4-229.2 66.8-0.5 0.3-1 0.4-1.4 0.4z m4.5-310.3v299.4c25.6-8.4 128.9-41.9 220.5-64.2v-157l-95.5 27.5-52.7 14.2c-0.4 0.1-4.7 1-8.6 1-3.3 0-5.7-0.6-7.3-2-2-1.6-2.1-3.8-2.2-8-0.5-13.9-1.8-54.9-54.2-110.9z m0 0" fill="#BEBEBE" p-id="5675"></path>
				<path d="M685.7 728.6s109.5 25.3 193.2 44.6v-317s-49.4 50.3-57.2 127.4l-78.9-14.4c0.1 0.1-0.9 94.5-57.1 159.4z m0 0" fill="#FAFAFA" p-id="5676"></path>
				<path d="M879 777.8c-0.3 0-0.7 0-1-0.1-83.8-19.3-193.2-44.6-193.2-44.6-1.6-0.4-2.8-1.5-3.3-3s-0.2-3.2 0.9-4.4c54.5-63 56-155.5 56-156.4 0-1.3 0.6-2.6 1.7-3.5 1-0.9 2.4-1.2 3.7-1l74.1 13.6c9.3-75 55.9-123.2 57.9-125.2 1.3-1.3 3.3-1.7 5-1 1.7 0.7 2.8 2.4 2.8 4.2v317c0 1.2-0.5 2.4-1.3 3.2-1 0.7-2.1 1.2-3.3 1.2z m-185-52c25 5.8 110.5 25.5 180.4 41.7v-299c-14 17.6-42.4 59.6-48.1 115.6-0.1 1.3-0.8 2.4-1.8 3.2-1 0.8-2.3 1.1-3.6 0.8l-73.8-13.5c-0.9 20.6-7.8 94.6-53.1 151.2z m0 0" fill="#BEBEBE" p-id="5677"></path>
				<path d="M938.3 582.6c-0.6-25.9-6-63.1-55.5-116.2 0 0 40.5 62.3 44 107.1l11.5 9.1z m-63.6-116.2s-44.6 54.4-48.6 117.3c0 0 11.1-4.2 12.5-10.3 7.3-33 26-80.9 36.1-96.6v-10.4z m0 0" fill="#E6E6E6" p-id="5678"></path>
				<path d="M538.3 127.3s30.2 17.5-31.8 68.5c0 0-8.9 15.9 16.9 22.1 0 0 3.5 1.1 9.9 2.7 0 0-14.9-7.9-20.4-11.5 0 0-4.4-3.8 1.1-8.6 0 0 46.3-38.5 34.3-62.5 0 0-3-6.8-10-10.7z m0 0" fill="#E7E7E7" p-id="5679"></path>
				<path d="M80.5 431.8c36.3-110.9 124.3-176.2 136.1-184.2 24.2-16.4 61-30.2 18.4-56.5s-12.9-55.8-12.9-55.8c-6.6 0.6-11.8 3.3-15.2 6.6-7.1 7.1-24.7 25.7 22 60.5 3.7 2.8 14.5 13.2 0 18.5C214.4 226.2-14 328 28.1 614 43.7 720 128 779 230 805.6 60.1 713.3 42.3 548.6 80.5 431.8z m0 0" fill="#F5F5F5" p-id="5680"></path>
				<path d="M84.7 486.9s-5.2 9.2-16.1 4c-10.9-5.2-14.1-10-21.3-11.9-7.2-1.9-20.6 25.9 7.4 47.2 28 21.3 48.7 19.9 52.8 19.7" fill="#F6F6F6" p-id="5681"></path>
				<path d="M104.6 550.6c-16.4 0-34.9-7.3-52.6-20.7-22.3-17-20.5-37.5-15.9-46.9 3.1-6.3 7.8-9.5 12.4-8.3 4.6 1.2 7.9 3.4 11.4 5.8 2.8 1.9 6 4.1 10.7 6.4C77 490 80 486 80.8 484.7c1.3-2.1 4-2.8 6.2-1.6 2.2 1.2 2.9 4 1.7 6.1-2.5 4.4-10.4 11.4-22 5.8-5.4-2.6-9-5.1-11.9-7.1-3-2-5.2-3.5-8-4.4-1.1 0.8-3.4 4-4.2 9.3-0.7 5-0.6 17.8 15 29.7 17.1 13 34.7 19.7 49.7 18.8l0.6 9.1c-1.2 0.1-2.2 0.2-3.3 0.2z m0 0" fill="#BEBEBE" p-id="5682"></path>
			</svg>
			<view class="order-nothing-text">目前没有商品库存哦~</view>
		</view>
		
		<!--list-->
		<backTop :src="backTop.src" :scrollTop="backTop.scrollTop"></backTop>
		
	</view>
</template>

<script>
	import {formatTimeToStr} from "@/utils/date";
	import backTop from '@/components/back-top/back-top.vue';
	export default {
		components: {
			backTop
		},
		data(){
			return {
				searchForm:{
					page:1
				},
				goodsList: [],
				pagination:{},
				goods_type: 1,
				backTop: {
					src: '/static/back-top/top.png',
					scrollTop: 0
				},
			}
		},
		onLoad(){
			this.switchTab(1);
		},
		//监听当前页面滚动，并同步给子组件
		onPageScroll(e) {
			this.backTop.scrollTop = e.scrollTop;
		},
		/* 触底调用子组件方法加载更多 */
		onReachBottom() {
			this.loadMore();
		},
		methods:{
			switchTab(sub) {
				let self = this;
				self.goodsList = [];
				self.goods_type = sub
				if(self.goods_type == 1){
					self.getStockGoodsList();
				}else{
					self.getLocalLifeStockGoodsList();
				}
			},
			async getStockGoodsList(){
				let res = await this.$http.request({
					url:this.$api.purchasing_system.stockGoodsList,
					method:'post',
					data:this.searchForm,
					showLoading:true
				});
				if(res.code != 0){
					this.$http.toast(res.msg);
					return ;
				}
				this.goodsList = res.data;
			},
			openUrl(url) {
				uni.navigateTo({url})
			},
			
			async getLocalLifeStockGoodsList(){
				let res = await this.$http.request({
					url:this.$api.localLife.stockGoodsList,
					method:'get',
					data:this.searchForm,
					showLoading:true
				});
				if(res.code != 0){
					this.$http.toast(res.msg);
					return ;
				}
				this.goodsList = res.data.list;
				this.pagination = res.data.pagination;
			},
			loadMore(){
				this.searchForm.page++;
				if(this.searchForm.page <= Math.ceil(this.pagination.total_count / this.pagination.pageSize)){
					this.switchTab(this.goods_type);
				}
			},
		},
		computed:{
			convertDistance(){
				return value =>{
					if(value){
						value = parseFloat(value).toFixed(2);
						let distance;
						if(value > 1000){
							distance = (value / 1000).toFixed(2) + 'km';
						}else{
							distance = value + 'm';
						}
						return distance;
					}
				}	
			},
			formatTimeToStr(){
				return value => formatTimeToStr(value,'yyyy-MM-dd')
			}
		}
	}
</script>

<style lang="scss">
	// 缺省页
	.order-nothing {
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.order-nothing-img {
		width: 187rpx;
		height: 187rpx;
		margin-bottom: 35rpx;
	}
	
	.order-nothing-text {
		font-size: 10pt;
		color: #808080;
	}
	.list-item{
		padding: 20rpx;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
	}
	.list-item .left{
		width: 30vw;
		height: 30vw;
	}
	.list-item .left image{
		width: 100%;
		height: 100%;
	}
	.list-item .right{
		width: 62vw;
		height: 30vw;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}
	.list-item .right .name{
		font-size: 12pt;
		line-height: 40rpx;
		height: 80rpx;
		word-break: break-all;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
	.list-item .right .btn {
		padding: 10rpx 30rpx;
		background-color: #FF7104;
		color: #fff;
		border-radius: 25rpx;
		font-size: 10pt;
	}
	
	.goods-type{
		display: flex;
		line-height: 60rpx;
		justify-content: space-around;
		background-color: #fff;
		position: fixed;
		top: 80rpx;
		width: 100vw;
		z-index: 1;
	}
	.goods-type view{
		padding: 10rpx 20rpx;
	}
	
	.body{
		margin-top: 80rpx;
	}
	
	
	.jx-modal-title {
		text-align: center;
		font-size: 34rpx;
		color: #333;
		padding-top: 20rpx;
		font-weight: bold;
	}
	.shopSetting-item {
		width: 90%;
		margin: 0 auto;
		border-bottom: 1rpx solid #888888;
		overflow: hidden;
		display: flex;
		justify-content: space-between
	}
	.shopSetting-title {
		height: 100rpx;
		line-height: 100rpx;
		margin-right: 20rpx;
		color: #000;
	}
	
	.shopSetting-int {
		height: 100rpx;
		max-width: 80%;
	}
	.shopSetting-int text{
		display: block;
		height: 100rpx;
		line-height: 100rpx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	.shopSetting-int input {
		height: 100rpx;
		text-align: right;
	}

</style>